﻿/*
 * Microsoft .NET  2.0+ version of Sphinx searchd client (Sphinx API)
 * 
 * Copyright (c) 2009, Shaun Berryman
 * All rights reserved
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License. You should have
 * received a copy of the GPL license along with this program; if you
 * did not, you can find it at http://www.gnu.org/
 */

using System;

namespace SphinxSearchApi
{
    /// <summary>
    /// There are the following matching modes available
    /// </summary>
    public enum MatchEnum : int
    {
        /// <summary>
        /// Matches all query words (default mode)
        /// </summary>
        All = 0,

        /// <summary>
        /// Matches any of the query words
        /// </summary>
        Any = 1,

        /// <summary>
        /// Matches query as a phrase, requiring perfect match
        /// </summary>
        Phrase = 2,

        /// <summary>
        /// Matches query as a boolean expression (see Section 4.2, "Boolean query syntax")
        /// </summary>
        Boolean = 3,

        /// <summary>
        /// matches query as an expression in Sphinx internal query language (see Section 4.3, 
        /// "Extended query syntax"). As of 0.9.9, this has been superceded by Extended2
        /// </summary>
        Extended = 4,

        /// <summary>
        /// matches query, forcibly using the "full scan" mode as below. NB, any query terms will be
        /// ignored, such that filters, filter-ranges and grouping will still be applied, but no text-matching.
        /// 
        /// The SPH_MATCH_FULLSCAN mode will be automatically activated in place of the specified matching mode when the following conditions are met:
        /// 
        /// 1. The query string is empty (ie. its length is zero).
        /// 2. docinfo storage is set to extern.
        /// </summary>
        FullScan = 5,

        /// <summary>
        /// providing additional functionality and better performance. The ident is retained for 
        /// legacy application code that will continue to be compatible once Sphinx and its 
        /// components, including the API, are upgraded
        /// </summary>
        Extended2 = 6
    }
}
